package org.jkyec.lambda.basic;

import java.util.function.BiConsumer;

public class BiConsumerTest {

	public static void main(String[] args) {
		BiConsumer<Husband, Wife> marryFunction = (husband, wife) -> { System.out.println(husband.getName() + " and " + wife.getName() + " are married each other."); };
	
		Husband h = new Husband("Jake");
		Wife w = new Wife("Wonderful");
		marryFunction.accept(h, w);
	}

}

class Husband {
	private String name;
	public Husband(String name) {
		this.name = name;
	}
	public String getName() {
		return this.name;
	}
}

class Wife {
	private String name;
	public Wife(String name) {
		this.name = name;
	}
	public String getName() {
		return this.name;
	}
}
